package com.farm.chain;

public class EmergencyHandler extends Handler {
    @Override
    public void handleRequest(Request request) {
        if (request.getType().equals("EMERGENCY")) {
            System.out.println("紧急情况处理器处理请求: " + request.getContent());
            System.out.println("1. 停止所有设备");
            System.out.println("2. 发送警报");
            System.out.println("3. 通知相关人员");
        } else if (nextHandler != null) {
            nextHandler.handleRequest(request);
        }
    }
} 